/**
 * 
 */
package name.yzhu.httpserver.handle;

import name.yzhu.httpserver.HttpRequestType;
import name.yzhu.httpserver.HttpReturnData;
import name.yzhu.httpserver.IHttpPermission;
import name.yzhu.httpserver.log.LogEntity;
import name.yzhu.httpserver.log.LogHandler;

/**
 * @author yhzhu
 *
 */
public interface HandleURLProcess {
	public static int INVALID_DATA_TYPE = 1;
	
	public static int NOT_ALLOW_NULL = 2;
	/**
	 * 
	 * @return
	 */
	public String getPattern();
	/**
	 * 
	 * @param num exception number: <pre>1: invalid data type <br>2: Not allow null</pre>
	 * @return
	 */
	public HttpReturnData getExceptionData(int num, String msg);
	/**
	 * 
	 * @param type
	 * @return
	 */
	public LogHandler getLogHandler(HttpRequestType type);
	/**
	 * 
	 * @param retData
	 * @param entity
	 */
	public void paraseRetData(HttpReturnData retData, LogEntity entity);
	
	public IHttpPermission getHttpPermissionFactory();
}
